#ifndef __AFE_H
#define __AFE_H

#include "main.h"




typedef struct
{
	uint8_t OVP;
	uint8_t UVP;
	uint8_t OTP;
	uint8_t UTP;

}Ec_t;
extern Ec_t Ec;

typedef struct
{
	uint16_t Vc[12];
	float F_Vc[12];
	uint16_t Tc[5];
	float F_Tc[16];
}UsartTxMsg_t;


typedef enum
{
    Temp1Test0_Temp2Test0 = 0x00,
	Temp1Ntc8_Temp2Ntc1 = 0x01,
    Temp1Ntc9_Temp2Ntc2 = 0x02,
	Temp1Ntc10_Temp2Ntc3 = 0x03,
    Temp1CurSecV_Temp2Ntc4 = 0x04,
    Temp1CurPryV_Temp2Ntc5 = 0x05,
    Temp1VsetDac_Temp2Ntc6 = 0x06,
    Temp1NC_Temp2Ntc7 = 0x07
}CD4051B_ADC_LTC6803_SEL;


//typedef enum
//{
//    TEST_0,
//	NTC_1,
//    NTC_2,
//    NTC_3,
//    NTC_4,
//    NTC_5,
//    NTC_6,
//    NTC_7,
//	NTC_8,
//	NTC_9,
//	NTC_10,
//	CUR_SEC_V,
//	CUR_PRY_V,
//	VSET_DAC
//}CD4051B_ADC_LTC6803_SEL;






extern UsartTxMsg_t UasrtTxMsg;




int VoltageSam(uint16_t *p_volt);
void AFETask(void);

void CDB4051B_GPIO_SEL(uint8_t CD4051B_NUM);




#endif
